About the Crystal Reports Sample Code
Speed up the process of integrating reporting into your Windows and Web applications by taking advantage of the sample code included with Crystal Reports. By using the samples as models for your own code, or by copying the sample code directly, you’ll find out just how easy it is to pack the powerful reporting functionality of Crystal Reports into your applications.
The sample code is categorized by programming language—Visual Studio .NET, Visual Basic, Visual C++, Delphi, Lotus Domino, and web-based. See the Sample code listing below for a description of each sample. 
Note: The Visual Studio .NET, Visual C++, Delphi, and ASP samples are only installed if explicitly selected during a “Custom” installation or if a “Complete” installation is chosen. The Visual Basic and web samples are installed with a “Typical” installation. The Lotus domino samples are installed only if Lotus client software is detected on the local machine.

What are the sample application requirements? 
Be sure to use Visual Studio .NET, Visual Basic 6.0, or Visual C++ 6.0 to view the Visual Studio .NET , Visual Basic, or Visual C++ sample applications. As well, use version 8 (or later) of the Report Designer Component for which the sample code is designed. Please visit the Seagate Software Support Site at  http://support.crystaldecisions.com to get more compatibility information.
Where can you get more sample applications?
Get more samples from the Crystal Decisions Support Site:
http://support.crystaldecisions.com/samples/
Feedback?
Let us know what kind of samples you’d like to see. Email us at crfeedback@crystaldecisions.com.
Sample code listing
This table lists the code samples by programming language, and offers a brief description of each sample. The directory location of each folder is included in the table; these locations will differ on your machine if Crystal Reports was not installed to the default program directory.
Sample Name	 Sample Description	Comments	
Visual Basic
C:\Program Files\Seagate Software\Crystal Reports\Samples\en\Code\Visual Basic	
ADO Connection Methods		Demonstrates methods of adding ADO connections to reports.	These samples demonstrate various features of the Report Designer Component.	
Change Runtime Location of OLE Object Demo 	Sets the location of an OLE object at runtime using the SetOleLocation command.		
No Data in Report Event	Shows the "No Data" Event.		
Printer Settings	Changes Printer Settings at runtime.		
Report Creation API	Demonstrates the use of the Report Object Creation API Features.		
Report Variables	Demonstrates the use of Report Variables.		
Report Expert	Demonstrates the use of the Crystal Report Expert.		
Search and Select Experts	Programmatically controls the Search and Select Experts.		
Unbound Fields	Demonstrates one way to use Unbound Fields.		
Viewer Runtime Options	Manipulates properties of the Crystal Reports ActiveX Viewer at Runtime.		
Employee Profiles	Demonstrates runtime report manipulation through VB code.	These are introductory Visual Basic samples.	
Inventory Demo	Demonstrates runtime report manipulation through VB code. This is an intermediate level sample.		
Simple Report	Demonstrates beginner level report creation from within Visual Basic.		
Viewer	Manipulates the Smart Viewer through Visual Basic code at runtime. This is an intermediate level sample.		
Field Mapping	Demonstrates how to manipulate field mapping.		

Sample Name	 Sample Description	Comments	
Visual Basic
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\Visual Basic	
First Class Hotels	A small hotel reservation system for a fictional company called First Class Hotels.	These are advanced Visual Basic samples.	
Load Picture	Loads pictures into a report at runtime through Visual Basic code.		
Pro Athlete Salary Report	Demonstrates Report Creation API features.		
Embeddable Designer Control	Demonstrates how to offer users the ability to design and view Crystal reports at runtime.		
.NET
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\NET	
WebForms.exe		
WinForms.exe		
C++ (Cpp)
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\Cpp	
Pro Athlete Salary Report	Demonstrates Report Creation API features using Visual C++. This is an advanced sample.	
Delphi
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\Delphi	
cr85vcl.exe	The latest edition of the Crystal Reports VCL for Delphi.	
Web and Active Server Pages
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\Web	
Unbound Fields Sample	Creates a report at runtime using unbound fields. The sample allows the user to select the order that the fields appear, the group, and group sort direction.	These web-enabled samples show some of the features of the Report Designer Component.	
ADO Recordset Sample	Passes an ADO recordset to a report.		
Report Exporting Sample	Exports a report to a variety of different file formats and delivers that file to the browser.		
Parameter Field Demo	Passes a parameter field value to a report.		
Selection Formula Demo	Passes a record selection formula to a report at runtime.		
Sort Fields Demo		Modifies an existing SORT field in the report and add a Sort field to the report at runtime.		

Sample Name	 Sample Description	Comments	
Lotus Notes Data
C:\NOTES\DATA	
Xglobal85.nsf	This Lotus Domino application invokes a report from both a form and a view using the Automation Server, as well as the print engine API. The report invoked in both cases is Lotusmap.rpt, which has been installed in the Crystal Reports\Samples\en\Code\Lotus Domino directory.	These sample applications show Lotus Domino integration. They are installed only if Lotus client software is detected on the local machine.
	
Crazev85.nsf	This Lotus Domino application invokes a report from both a form and a view using the Automation Server as well as the Active X Control (OCX). The report invoked in both cases is World Wide Sales.rpt, which is installed in the Crystal Reports\Samples\en\Code\Lotus Domino directory.		
Lotus Domino sample reports
C:\Program Files\Crystal Decisions\Crystal Reports 9\Samples\en\Code\Lotus Domino	
Lotusmap.rpt	A report that was created on Xglobal85.nsf data using the Domino native driver. The Xglobal85.nsf is installed into your Notes\Data directory.	These sample reports show the potential for integrating Crystal reporting within a Lotus Domino environment. They are installed only if Lotus client software is detected on the local machine.	
World Wide Sales.rpt	A report that was created on Crazev85.nsf data using the Domino native driver. The Crazev85.nsf is installed into your Notes\Data directory.